package de.stefanocke.roo.wicket.form.entityselect;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Service;
import org.springframework.roo.classpath.itd.ItdTypeDetailsProvidingMetadataItem;

import de.stefanocke.roo.wicket.RooSimpleEntitySelect;
import de.stefanocke.roo.wicket.Stereotypes;
import de.stefanocke.roo.wicket.base.ModelClassAwareItdMetadataProviderBase;
import de.stefanocke.roo.wicket.base.ModelClassAwareMetadataCreationParams;
import de.stefanocke.roo.wicket.form.FormComponentMetadata;

@Component
@Service
public class SimpleEntitySelectMetadataProvider extends
		ModelClassAwareItdMetadataProviderBase<SimpleEntitySelectMetadata, SimpleEntitySelectAnnotationValues> {

	public SimpleEntitySelectMetadataProvider() {
		super(RooSimpleEntitySelect.class, SimpleEntitySelectMetadata.class, SimpleEntitySelectAnnotationValues.class,
				FormComponentMetadata.class);
	}

	@Override
	protected ItdTypeDetailsProvidingMetadataItem getMetadataInternal(
			ModelClassAwareMetadataCreationParams<SimpleEntitySelectAnnotationValues> cmcp) {

		return new SimpleEntitySelectMetadata(cmcp);
	}

	@Override
	protected String requiredStereotype() {
		return Stereotypes.SIMPLE_ENTITY_SELECT;
	}
}
